package net.cjw.initsb.config.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import net.cjw.initsb.interceptor.test.DemoInterceptor;

@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {

	/**
	 * 配置拦截器
	 */
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new DemoInterceptor()).addPathPatterns("/**");
	}

}
